define(function(require) {

  console.info("app starting...");

  var app = angular.module('myApp', ['ui.router']);

  


  app.config(function($stateProvider, $urlRouterProvider) {
    $stateProvider.state('login', {
      url : "/login",
      templateUrl: 'app/login/login.html',
      controller: function(){
        console.info("---------------login controller---------------");
        require("login");
      }
    });
    $stateProvider.state('register', {
      url : "/register",
      templateUrl: 'app/register/register.html',
      controller: function(){
        console.info("---------------register controller---------------");
        require("register");
      }
    });
    // $urlRouterProvider.otherwise('login');
  });

  



  angular.bootstrap(document.body, ['myApp']);

});